<?php
	include "sql.php";
	if(is_array($_POST)&&count($_POST)>0){
		$name = $amount = $price = $remain = $lat = $lng = $mName = "";
		if ($_SERVER["REQUEST_METHOD"] == "POST"){
		  $name = $_POST["name"];
		  $amount = $_POST["amount"];
		  $price = $_POST["price"];
		  $remain = $_POST["remain"];
		  $lat = $_POST["lat"];
		  $lng = $_POST["lng"];
		  $mName = $_POST["mName"];
		  if($name!=null) echo setStation($name,$amount,$price,$remain,$lat,$lng,$mName);
		  else echo 0;
		  return;
		}
	}
	
?>

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	<form action="setStation.php" method="post">
		station name:<input type="text" name="name"><br>
		station amount:<input type="text" name="amount"><br>
		station price(/h):<input type="text" name="price"><br>
		station remian:<input type="text" name="remain"><br>
		station lat:<input type="text" name="lat"><br>
		station lng:<input type="text" name="lng"><br>
		station mName:<input type="text" name="mName"><br>
		<input type="submit" name="">
	</form>
</body>
</html>

